// 搜索

const request = require("./request");
module.exports = (query) => {
  const data = {
    s: query.keywords.toString(),
    type: query.type.toString() || '1', // 1: 单曲, 10: 专辑, 100: 歌手, 1000: 歌单, 1002: 用户, 1004: MV, 1006: 歌词, 1009: 电台, 1014: 视频
    limit: query.limit.toString() || '30',
    offset: query.offset.toString() || '0',
    total: 'true',
  }
  return request(`https://music.163.com/api/cloudsearch/pc`, data,query.cookie,false)
}
